home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: alt.security
- From: murphy@symcom.math.uiuc.edu (Michael L. Murphy)
- Subject: Re: rsh
- References: <15433@gandalf.UMCS.Maine.EDU>
- Message-ID: <1992Apr15.203649.3936@news.cso.uiuc.edu>
- Summary: use "xauth" to make X11 secure.
- Organization: Math Dept., University of Illinois at Urbana/Champaign
-
- In article <15433@gandalf.UMCS.Maine.EDU> who@gandalf.UMCS.Maine.EDU writes:
- >
- > People are able to rsh commands to other peoples consoles and
- >I was wondering how permissions could be set to prevent this. It can
- >get anoying when people rsh the screen melt to my console. We run SunOS
- >4.1 and use SUN 4/110 machines. Also, someone got hold of xlock.c and
- >has modified it as a nasty trojan horse by using rsh to lock people's
- >screens. The modifications were simple, but with a little effort could
- >be made far more evil. So, for your safety and mine, please prevent
- >rsh to other people's sessions.
- >
-
- Your letter is a little confusing, but it sounds like you are running
- Xwindows. It also sounds like you are not using the .Xauthority file.
- First of all, create a file .xsession in the user's home directory
- that says:
-
- exec X -auth $HOME/.Xauthority
-
- Now, use the "xauth" command to add entries for any hosts you might use:
-
- example% xauth
- xauth: Creating new file ~/.Xauthority......
- xauth> add host1:0 . 5c701355
- xauth> add host1/unix:0 . 5c701355
- xauth> add host2:0 . 5c701355
- xauth> add host2/unix:0 . 5c701355
- etc......
- xauth> quit
-
- (It doesn't matter what hexadecimal number you use, as long as it has an
- even number of digits.) "." is an abbreviation for MIT-MAGIC-COOKIE-1
- protocol, which is not completely secure, but will certainly ward off
- ameteur attempts to connect unauthorized clients to an Xserver.
-
- You will notice that after you run xauth, a file ".Xauthority" will be
- created in your home directory. It will also only be user-readable.
- (If the file could be read, it could be copied and used by any other
- user on your system.)
-
- Now, the Xserver when starting up will read this file and only accept
- clients who use that certain hexadecimal "cookie" specified in your
- .Xauthority file. Also, all clients will read that file and use
- that cookie to connect to your server. See the man pages of "X" and
- "xauth" for more information.
- --
- +=And=the=Master=said=unto=the=silence,="In=the=path=of=our=happiness=shall=+
- \ we find the learning for which we have chosen this lifetime." - R. Bach /
- / Michael Murphy, senior (Math/C.S.), U of Ill. | Address: URH 10 Carr \
- +=send=e-mail=to=<murphy@symcom.math.uiuc.edu>==/^\==Urbana,=IL=61801=======+
-
-